﻿using System.Collections.Generic;
using NUnit.Framework;
using StringExtensions;

namespace StringToDictionaryConverterTests
{
 [TestFixture]
  public class GoodCaseSyntax
  {
    [Test]
    public void OnePair()
    {
      const string sut = "a=1";
      var result = sut.ToDictionary();
      var expected = new Dictionary<string, string> { {"a", "1"} };

      Assert.That(result, Is.EqualTo(expected));
    }

    [Test]
    public void ExampleAsOnTheTable()
    {
      const string sut = "a=1;b=2;c=3";
      var result = sut.ToDictionary();
      var expected = new Dictionary<string, string>
                       {
                         { "a", "1" },
                         { "b", "2" },
                         { "c", "3" },
                       };

      Assert.That(result, Is.EqualTo(expected));
    }


  }
}
